﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true"
    CodeFile="Default.aspx.cs" Inherits="_Default" %>

<asp:Content ID="Content1" ContentPlaceHolderID="CPH_head" runat="Server">
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="CPH_BreadCrumbs" runat="Server">
    <ul class="breadcrumb">
        <li><i class="icon-home home-icon"></i><a href="#">首页</a> <span class="divider"><i
            class="icon-angle-right arrow-icon"></i></span></li>
    </ul>
    <div class="nav-search" id="nav-search">
        <div class="form-search">
            <span class="input-icon">
                <input type="text" placeholder="本页查找 ..." class="input-small nav-search-input" id="nav-search-input"
                    autocomplete="off" />
                <i class="icon-search nav-search-icon"></i></span>
        </div>
    </div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="CPH_Content" runat="Server">
    <div class="span12">
        <div class="widget-box ">
            <div class="widget-header">
                <h4 class="lighter smaller">
                    <i class="icon-comment blue"></i>留言
                </h4>
            </div>
            <div class="widget-body">
                <div class="widget-main no-padding">
                    <div class="dialogs" id="dialog1">
                        <asp:Repeater ID="rpt_Msg" runat="server">
                            <ItemTemplate>
                                <div class="itemdiv dialogdiv">
                                    <div class="user">
                                        <img alt="Alexa's Avatar" src="images/avatar/nopic.png" />
                                    </div>
                                    <div class="body">
                                        <div class="time">
                                            <i class="icon-time"></i><span class=""><%# DocViewer.Common.TimeParser.DateDiff( DateTime.Parse(Eval("LeaveTime").ToString()),DateTime.Now) %></span>
                                        </div>
                                        <div class="name">
                                            <a href="#"><%# Eval("TrueName") %></a>
                                        </div>
                                        <div class="text">
                                            <%# Eval("Msg") %>
                                        </div>
                                        <div class="tools">
                                            <a href="#" class="btn btn-minier btn-info"><i class="icon-only icon-share-alt"></i>
                                            </a>
                                        </div>
                                    </div>
                                </div>
                            </ItemTemplate>
                        </asp:Repeater>
                    </div>
                    <div class="form-actions input-append">
                        <input placeholder="输入留言内容 ..." type="text" id="txt_msg" class="width-75" name="message" />
                        <button class="btn btn-small btn-info no-radius" onclick="return LeaveMsg()">
                            <i class="icon-share-alt"></i><span class="hidden-phone">留言</span>
                        </button>
                    </div>
                </div>
                <!--/widget-main-->
            </div>
            <!--/widget-body-->
        </div>
        <!--/widget-box-->
    </div>
    <!--/span-->
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="CPH_Foot" runat="Server">
<script>
    $('.dialogs').slimScroll({
        height: '300px'
    });
    function LeaveMsg() {
        var msg = $("#txt_msg").val();
        if (msg.length == 0)
            return false;
        $.ajax({
            url: "./Controls/ajax.aspx?op=LeaveMsg",
            data: { "msg": msg },
            success: function (res) {
                window.open("./Default.aspx",'_self');
            }
        });
        return false;
    }
</script>
</asp:Content>
